<?php use_helper('Form') ?>
<table class="statistike" cellspacing="0" cellpadding="0" border="1" width="1050" style="border-collapse: collapse; empty-cells: show;">
  <tr>
    <th colspan="5">
      <form method="post" name="sel">
        <?php echo select_tag('skola_id', options_for_select($skola_list, $sf_request->getParameter('skola_id'))) ?>
        <?php echo select_tag('mesec', options_for_select($mesecs, ($sf_request->getParameter('mesec'))?$sf_request->getParameter('mesec'):date('n'))) ?>
        <?php echo select_tag('godina', options_for_select($godinas, ($sf_request->getParameter('godina'))?$sf_request->getParameter('godina'):date('Y'))) ?>
        <button type="submit" class="button">Pregled</button>
      </form>
    </th>
  </tr>
  <tr>
    <th>Datum</th>
    <th>Ocene</th>
    <th>Izostanci</th>
    <th>Domaći</th>
    <th>Obaveštenja</th>
  </tr>

  <?php
  foreach($datums as $datum)
  {
    if(isset($ocenas[$datum]) or isset($izostanaks[$datum]) or isset($domacis[$datum]) or isset($obavestenjes[$datum])){?>
  <tr>
    <td><?php echo $datum ?></td>
    <td><?php echo isset($ocenas[$datum])?$ocenas[$datum]:'' ?></td>
    <td><?php echo isset($izostanaks[$datum])?$izostanaks[$datum]:'' ?></td>
    <td><?php echo isset($domacis[$datum])?$domacis[$datum]:'' ?></td>
    <td><?php echo isset($obavestenjes[$datum])?$obavestenjes[$datum]:'' ?></td>
  </tr>
  <?php }}?>

</table>